load("//kotlin:jvm.bzl", "kt_jvm_binary", "kt_jvm_library")

kt_jvm_library(
    name = "kotlin_release_options_lib",
    srcs = glob(["**/*.kt"]),
    deps = [
        "//kotlin/compiler:kotlin-compiler",
        "//kotlin/compiler:kotlin-reflect",
    ],
)

kt_jvm_binary(
    name = "kotlin_release_options",
    args = [
        "--out",
        "$${BUILD_WORKSPACE_DIRECTORY}/src/main/starlark/core/repositories/kotlin",
    ],
    main_class = "io.bazel.kotlin.generate.WriteKotlincCapabilities",
    runtime_deps = [
        ":kotlin_release_options_lib",
    ],
)
